<?php
/**
 * Created by PhpStorm.
 * User: 4399-0661
 * Date: 15-4-11
 * Time: 下午3:36
 */

namespace test;


class libConnectionTest extends \PHPUnit_Framework_TestCase
{
    public function testMain()
    {
        $array = [
            "80615" => "苹果",
            "80616" => "栗子",
            "80617" => "梨子",
            "80618" => "香蕉",
            "80619" => "dfsdf",
            "80610" => "苹果"
        ];
        $connection = \LibConnection::instance($array);
        $connection->appendElement();
        var_dump($connection->valid());
        while($connection->valid()){
            print_r($connection->key()."=>".$connection->current()."\r\n");
            $connection->next();
        }
    }
} 